package com.yueyang.sojourn.server.common.baymax.web.result.spi.imp;

import com.yueyang.sojourn.server.common.baymax.web.result.RestResult;
import com.yueyang.sojourn.server.common.baymax.web.result.spi.RestResultProvider;

/**
 * 默认实现
 */
public class DefaultRestResultProvider implements RestResultProvider {

  @Override
  public boolean support(Object source) {
    return source instanceof RestResult;
  }

  @Override
  public RestResult produce(Object source) {
    return RestResult.class.cast(source);
  }

}
